package com.astrocsr.domain.web;

import com.astrocsr.common.EbppKeys;
import com.astrocsr.common.helper.ConfigHelper;
import com.astrocsr.common.helper.EncryptionHelper;


public class BillInfo implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 1L;

	private String stmtdate;
	private String groupCode;
	private String groupName;
	private String param;

	public String getStmtdate() {
		return stmtdate;
	}
	public void setStmtdate(String stmtdate) {
		this.stmtdate = stmtdate;
	}
	public String getGroupCode() {
		return groupCode;
	}
	public void setGroupCode(String groupCode) {
		this.groupCode = groupCode;
	}
	public String getGroupName() {
		return groupName;
	}
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}
	public String getParam() {
		try {

			String encrypted_stmtdate 	= EncryptionHelper.encrypt(stmtdate, ConfigHelper.getInstance().get(EbppKeys.ENCRYPTION_PASSPHRASE));
			String encrypted_groupCode 	= EncryptionHelper.encrypt(groupCode, ConfigHelper.getInstance().get(EbppKeys.ENCRYPTION_PASSPHRASE));
	
			param = EbppKeys.PARAM_GROUP_CODE + "=" + EncryptionHelper.encodeURL(encrypted_groupCode) + 
					"&" + EbppKeys.PARAM_STMT_DATE + "=" + EncryptionHelper.encodeURL(encrypted_stmtdate);

		} catch (Exception e) {
			e.printStackTrace();
			param = "";
		}
		return param;
	}

}